package com.morizhang.merchanmanager.api.dao;

import com.morizhang.merchanmanager.api.model.CommodityLocationModel;
import com.morizhang.merchanmanager.api.model.StockModel;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface CommodityStorageDao {
    List<StockModel> selectAllCommodityStorage();
    StockModel queryCommodityStorage(StockModel stockModel);
    List<StockModel> queryCommodityStorageByBarcode(String barCode);
    void addCommodityStorage(StockModel stockModel);
    void updateCommodityStorage(StockModel stockModel);
    void deleteCommodityStorage(String serialNo);

    StockModel queryCommodityUnlocation(StockModel stockModel);
    List<StockModel> queryAllCommodityUnlocation();
    void addCommodityUnlocation(StockModel stockModel);
    void updateCommodityUnlocation(StockModel stockModel);
    void deleteCommodityUnlocation(String serialNo);

    List<CommodityLocationModel> queryCommodityLocation(CommodityLocationModel commodityLocationModel);
    List<CommodityLocationModel> queryCommodityStorageByWarehouseShelf(String warehouseShelfNo);
    CommodityLocationModel queryCommodityLocationByBarcodeBatchNoShelfNo(CommodityLocationModel commodityLocationModel);
    CommodityLocationModel queryCommodityLocationBySerialNo(String serialNo);
    void addCommodityLocation(CommodityLocationModel commodityLocationModel);
    void updateCommodityLocation(CommodityLocationModel commodityLocationModel);
    void deleteCommodityLocation(String serialNo);

    List<CommodityLocationModel> queryCommodityShopLocation(CommodityLocationModel commodityLocationModel);
    CommodityLocationModel queryCommodityShopLocationByBarcodeShelfNo(CommodityLocationModel commodityLocationModel);
    CommodityLocationModel queryCommodityShopLocationBySerialNo(String serialNo);
    void addCommodityShopLocation(CommodityLocationModel commodityLocationModel);
    void updateCommodityShopLocation(CommodityLocationModel commodityLocationModel);
    void deleteCommodityShopLocation(String serialNo);

    List<CommodityLocationModel> queryAllCommodityReturned();
    CommodityLocationModel queryCommodityReturnedByBarcode(String barCode);
    CommodityLocationModel queryCommodityReturnedBySerialNo(String serialNo);
    void addCommodityReturned(CommodityLocationModel commodityLocationModel);
    void updateCommodityReturned(CommodityLocationModel commodityLocationModel);
    void deleteCommodityReturned(String serialNo);
}
